package com.job.action;

import com.job.dao.BaseDao.PageResult;
import com.job.model.admin.Resource;
import com.job.service.ResourceService;


public class ResourceAction extends SupperAction {
	private static final long serialVersionUID = 1L;
	private ResourceService resourceService;
	private PageResult<Resource> pageResult;
	
	public PageResult<Resource> getPageResult() {
		return pageResult;
	}
	public void setPageResult(PageResult<Resource> pageResult) {
		this.pageResult = pageResult;
	}
	@javax.annotation.Resource(name="resourceService")
	public void setResourceService(ResourceService resourceService) {
		this.resourceService = resourceService;
	}
	public String menuList(){
//		String resourceName = this.getRequest().getParameter("resourceName");
		String pageNo = this.getRequest().getParameter("gotoPageNo");
		if(pageNo==null||"".equals(pageNo)){
			pageNo = "1";
		}
		int gotoPageNo = Integer.parseInt(pageNo);
		this.setPageResult(this.resourceService.findResourcePageResult("menuList", 20, gotoPageNo));
		return SUCCESS;
	}

	
}
